<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/12/30
  Time: 10:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>center</title>
</head>
<body>
<script>
    function addTab(title,icon,src){
        var b = $('#tt').tabs('exists',title);
        if(b){
            $('#tt').tabs('select',title);
        }else{
            $('#tt').tabs('add',{
                title:title,
                iconCls:icon,
                closable:true,
                content:'<iframe src="'+src+'" frameborder="no" scrolling="auto" style="width: 100%;height: 99.5%;"></iframe>'
            });
        }
    }
    function closeAll(){
        var tabs = $('#tt').tabs('tabs');
        var l = tabs.length;
        for(var i=0;i<l;i++){
            $('#tt').tabs('close',1);
        }
    }
    function maxMin() {
        //获取顶部的面板
        var north = $('#cc').layout('panel','north').panel('options');
        if(!north.collapsed){//展开
            $('#maxmin').html('还&nbsp;&nbsp;原');
            $('#cc').layout('collapse','north').layout('collapse','west').layout('collapse','south');
        }else{
            $('#maxmin').html('最大化');
            $('#cc').layout('expand','north').layout('expand','west').layout('expand','south');
        }
    }
</script>

<div id="tt" class="easyui-tabs"
     data-options="fit:true,
     tabPosition:'top',
     headerWidth:100,pill:false,tools:'#tools'">
    <div title="首页" data-options="iconCls:'icon-home',href:'${ctx}/ic/home'"
         style="padding:20px;display:none;">
    </div>
</div>
<div id="tools">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-delete'" onclick="closeAll()">全关闭</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-remove'"  onclick="maxMin()">
        <span id="maxmin">最大化</span>
    </a>
</div>
</body>
</html>

